<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>chart</title>
    <style type="text/css">
        * {
            padding: 0; margin: 0; background: transparent;
        }
        svg{background: none!important;}
    </style>
<script type="text/javascript" src="./libdist/fusioncharts/fusioncharts.js"></script>
<script type="text/javascript">
var Request = {
    QueryString : function(item){
        var svalue = location.search.match(new RegExp("[\?\&]" + item + "=([^\&]*)(\&?)","i"));
        return svalue ? svalue[1] : svalue;
    }
};
if (window.FusionCharts) {
    FusionCharts.ready(function () {
        // Create a new instance of FusionCharts for rendering inside an HTML
        // `<div>` element with id `my-chart-container`.
        var data = Request.QueryString("data");
        data = JSON.parse(decodeURIComponent(data));
        //if (data.type == "msline") {
        //    data.dataSource.chart.labelStep = data.dataSource.dataset[0].data.length < 4 ? 1 : Math.ceil(data.dataSource.dataset[0].data.length / 4);
        //}
        if(data && data.dataSource && data.dataSource.data && data.dataSource.data.length == 0){
            return
        }
        if(data && data.dataSource && data.dataSource.dataset && data.dataSource.dataset.length == 0){
            return
        }
        // if(data.dataSource.chart.bgcolor){
        //     $('#chart')
        // }
        var myChart = new FusionCharts(data);
        myChart.configure("PBarLoadingText", "　　");
        // Render the chart.
        myChart.render();
    });
}
</script>
</head>
<body>
    <div id="chart"></div>
</body>
</html>


